package com.kfm.pm;

public class Pet {

    private String name;
    private int age;

    public String color;

    protected double weight;

    public Pet(){}

    public Pet(String name, int age, String color, double weight, String voice) {
        this.name = name;
        this.age = age;
        this.color = color;
        this.weight = weight;
        this.voice = voice;
    }

    String voice;

    private void privateMethod () {
        System.out.println("这是一个私有方法");
    }

    public void eat() {
        System.out.println("这是一个eat方法");
    }

    protected void sleep() {
        System.out.println("这是一个protected方法");
    }
    void packageAccessMethod() {
        System.out.println("这是一个packageAccess方法");
    }
}
